import execjs


class MakerMd5:

    def __init__(self):
        with open('../../resources/match1/encrypted_md5.js', 'r', encoding='utf8') as f:
            self.js_ctx = execjs.compile(f.read())

    def hex_md5(self, target):
        return self.js_ctx.call('hex_md5', target)

